3.112 \(\int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{5/2}} \, dx\)

Optimal. Leaf size=167 \[ -\frac {11 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{128 \sqrt {2} a^{5/2} f}+\frac {11 \sec (e+f x)}{96 a^2 f \sqrt {a \sin (e+f x)+a}}-\frac {11 \cos (e+f x)}{128 a f (a \sin (e+f x)+a)^{3/2}}+\frac {17 \sec (e+f x)}{48 a f (a \sin (e+f x)+a)^{3/2}}-\frac {\sec (e+f x)}{6 f (a \sin (e+f x)+a)^{5/2}} \]

[Out]

-1/6*sec(f*x+e)/f/(a+a*sin(f*x+e))^(5/2)-11/128*cos(f*x+e)/a/f/(a+a*sin(f*x+e))^(3/2)+17/48*sec(f*x+e)/a/f/(a+
a*sin(f*x+e))^(3/2)-11/256*arctanh(1/2*cos(f*x+e)*a^(1/2)*2^(1/2)/(a+a*sin(f*x+e))^(1/2))/a^(5/2)/f*2^(1/2)+11
/96*sec(f*x+e)/a^2/f/(a+a*sin(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2712, 2859, 2687, 2650, 2649, 206} \[ \frac {11 \sec (e+f x)}{96 a^2 f \sqrt {a \sin (e+f x)+a}}-\frac {11 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{128 \sqrt {2} a^{5/2} f}-\frac {11 \cos (e+f x)}{128 a f (a \sin (e+f x)+a)^{3/2}}+\frac {17 \sec (e+f x)}{48 a f (a \sin (e+f x)+a)^{3/2}}-\frac {\sec (e+f x)}{6 f (a \sin (e+f x)+a)^{5/2}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^2/(a + a*Sin[e + f*x])^(5/2),x]

[Out]

(-11*ArcTanh[(Sqrt[a]*Cos[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sin[e + f*x]])])/(128*Sqrt[2]*a^(5/2)*f) - Sec[e + f*x
]/(6*f*(a + a*Sin[e + f*x])^(5/2)) - (11*Cos[e + f*x])/(128*a*f*(a + a*Sin[e + f*x])^(3/2)) + (17*Sec[e + f*x]
)/(48*a*f*(a + a*Sin[e + f*x])^(3/2)) + (11*Sec[e + f*x])/(96*a^2*f*Sqrt[a + a*Sin[e + f*x]])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2649

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2/d, Subst[Int[1/(2*a - x^2), x], x, (b*C
os[c + d*x])/Sqrt[a + b*Sin[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2650

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*Cos[c + d*x]*(a + b*Sin[c + d*x])^n)/(a*
d*(2*n + 1)), x] + Dist[(n + 1)/(a*(2*n + 1)), Int[(a + b*Sin[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d},
 x] && EqQ[a^2 - b^2, 0] && LtQ[n, -1] && IntegerQ[2*n]

Rule 2687

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> -Simp[(b*(g*
Cos[e + f*x])^(p + 1))/(a*f*g*(p + 1)*Sqrt[a + b*Sin[e + f*x]]), x] + Dist[(a*(2*p + 1))/(2*g^2*(p + 1)), Int[
(g*Cos[e + f*x])^(p + 2)/(a + b*Sin[e + f*x])^(3/2), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0]
&& LtQ[p, -1] && IntegerQ[2*p]

Rule 2712

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[(b*(a + b*Sin[e +
 f*x])^m)/(a*f*(2*m - 1)*Cos[e + f*x]), x] - Dist[1/(a^2*(2*m - 1)), Int[((a + b*Sin[e + f*x])^(m + 1)*(a*m -
b*(2*m - 1)*Sin[e + f*x]))/Cos[e + f*x]^2, x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] &&  !IntegerQ
[m] && LtQ[m, 0]

Rule 2859

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[((b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(a*f*g*(2*m +
p + 1)), x] + Dist[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^
(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[
m + p], 0]) && NeQ[2*m + p + 1, 0]

Rubi steps

\begin {align*} \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{5/2}} \, dx &=-\frac {\sec (e+f x)}{6 f (a+a \sin (e+f x))^{5/2}}+\frac {\int \frac {\sec ^2(e+f x) \left (-\frac {5 a}{2}+6 a \sin (e+f x)\right )}{(a+a \sin (e+f x))^{3/2}} \, dx}{6 a^2}\\ &=-\frac {\sec (e+f x)}{6 f (a+a \sin (e+f x))^{5/2}}+\frac {17 \sec (e+f x)}{48 a f (a+a \sin (e+f x))^{3/2}}+\frac {11 \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sin (e+f x)}} \, dx}{96 a^2}\\ &=-\frac {\sec (e+f x)}{6 f (a+a \sin (e+f x))^{5/2}}+\frac {17 \sec (e+f x)}{48 a f (a+a \sin (e+f x))^{3/2}}+\frac {11 \sec (e+f x)}{96 a^2 f \sqrt {a+a \sin (e+f x)}}+\frac {11 \int \frac {1}{(a+a \sin (e+f x))^{3/2}} \, dx}{64 a}\\ &=-\frac {\sec (e+f x)}{6 f (a+a \sin (e+f x))^{5/2}}-\frac {11 \cos (e+f x)}{128 a f (a+a \sin (e+f x))^{3/2}}+\frac {17 \sec (e+f x)}{48 a f (a+a \sin (e+f x))^{3/2}}+\frac {11 \sec (e+f x)}{96 a^2 f \sqrt {a+a \sin (e+f x)}}+\frac {11 \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx}{256 a^2}\\ &=-\frac {\sec (e+f x)}{6 f (a+a \sin (e+f x))^{5/2}}-\frac {11 \cos (e+f x)}{128 a f (a+a \sin (e+f x))^{3/2}}+\frac {17 \sec (e+f x)}{48 a f (a+a \sin (e+f x))^{3/2}}+\frac {11 \sec (e+f x)}{96 a^2 f \sqrt {a+a \sin (e+f x)}}-\frac {11 \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{128 a^2 f}\\ &=-\frac {11 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{128 \sqrt {2} a^{5/2} f}-\frac {\sec (e+f x)}{6 f (a+a \sin (e+f x))^{5/2}}-\frac {11 \cos (e+f x)}{128 a f (a+a \sin (e+f x))^{3/2}}+\frac {17 \sec (e+f x)}{48 a f (a+a \sin (e+f x))^{3/2}}+\frac {11 \sec (e+f x)}{96 a^2 f \sqrt {a+a \sin (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.40, size = 284, normalized size = 1.70 \[ \frac {\frac {48 \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^5}{\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )}+15 \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^4-30 \sin \left (\frac {1}{2} (e+f x)\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^3+52 \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2-104 \sin \left (\frac {1}{2} (e+f x)\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )+\frac {64 \sin \left (\frac {1}{2} (e+f x)\right )}{\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )}+(33+33 i) (-1)^{3/4} \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^5 \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (\tan \left (\frac {1}{4} (e+f x)\right )-1\right )\right )-32}{384 f (a (\sin (e+f x)+1))^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^2/(a + a*Sin[e + f*x])^(5/2),x]

[Out]

(-32 + (64*Sin[(e + f*x)/2])/(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) - 104*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] +
Sin[(e + f*x)/2]) + 52*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 - 30*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(
e + f*x)/2])^3 + 15*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^4 + (33 + 33*I)*(-1)^(3/4)*ArcTanh[(1/2 + I/2)*(-1)^
(3/4)*(-1 + Tan[(e + f*x)/4])]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^5 + (48*(Cos[(e + f*x)/2] + Sin[(e + f*x)
/2])^5)/(Cos[(e + f*x)/2] - Sin[(e + f*x)/2]))/(384*f*(a*(1 + Sin[e + f*x]))^(5/2))

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 279, normalized size = 1.67 \[ \frac {33 \, \sqrt {2} {\left (3 \, \cos \left (f x + e\right )^{3} + {\left (\cos \left (f x + e\right )^{3} - 4 \, \cos \left (f x + e\right )\right )} \sin \left (f x + e\right ) - 4 \, \cos \left (f x + e\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) + 4 \, {\left (77 \, \cos \left (f x + e\right )^{2} + {\left (33 \, \cos \left (f x + e\right )^{2} - 224\right )} \sin \left (f x + e\right ) - 160\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{1536 \, {\left (3 \, a^{3} f \cos \left (f x + e\right )^{3} - 4 \, a^{3} f \cos \left (f x + e\right ) + {\left (a^{3} f \cos \left (f x + e\right )^{3} - 4 \, a^{3} f \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+a*sin(f*x+e))^(5/2),x, algorithm="fricas")

[Out]

1/1536*(33*sqrt(2)*(3*cos(f*x + e)^3 + (cos(f*x + e)^3 - 4*cos(f*x + e))*sin(f*x + e) - 4*cos(f*x + e))*sqrt(a
)*log(-(a*cos(f*x + e)^2 - 2*sqrt(2)*sqrt(a*sin(f*x + e) + a)*sqrt(a)*(cos(f*x + e) - sin(f*x + e) + 1) + 3*a*
cos(f*x + e) - (a*cos(f*x + e) - 2*a)*sin(f*x + e) + 2*a)/(cos(f*x + e)^2 - (cos(f*x + e) + 2)*sin(f*x + e) -
cos(f*x + e) - 2)) + 4*(77*cos(f*x + e)^2 + (33*cos(f*x + e)^2 - 224)*sin(f*x + e) - 160)*sqrt(a*sin(f*x + e)
+ a))/(3*a^3*f*cos(f*x + e)^3 - 4*a^3*f*cos(f*x + e) + (a^3*f*cos(f*x + e)^3 - 4*a^3*f*cos(f*x + e))*sin(f*x +
 e))

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+a*sin(f*x+e))^(5/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)2/f*2*(-1/16*(sqrt
(a)*tan((f*x+exp(1))/2)+sqrt(a)-sqrt(a*tan((f*x+exp(1))/2)^2+a))/a^2/(-(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*ta
n((f*x+exp(1))/2)^2+a))^2-2*sqrt(a)*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))+a)/sign(tan
((f*x+exp(1))/2)+1)+1/768*(81*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^11-1083*sqrt(a)*(
-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^10+2001*a*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*t
an((f*x+exp(1))/2)^2+a))^9-1071*sqrt(a)*a*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^8-250
2*a^2*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^7+1330*sqrt(a)*a^2*(-sqrt(a)*tan((f*x+exp
(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^6+3378*a^3*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2
+a))^5+546*sqrt(a)*a^3*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^4-1499*a^4*(-sqrt(a)*tan
((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^3-339*a^5*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(
1))/2)^2+a))-807*sqrt(a)*a^4*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^2-35*sqrt(a)*a^5)/
a^2/(-(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^2+2*sqrt(a)*(-sqrt(a)*tan((f*x+exp(1))/2)
+sqrt(a*tan((f*x+exp(1))/2)^2+a))+a)^6/sign(tan((f*x+exp(1))/2)+1)+11/256*atan((-sqrt(a)*tan((f*x+exp(1))/2)-s
qrt(a)+sqrt(a*tan((f*x+exp(1))/2)^2+a))/sqrt(2)/sqrt(-a))/sqrt(2)/a^2/sqrt(-a)/sign(tan((f*x+exp(1))/2)+1))

________________________________________________________________________________________

maple [A]  time = 0.96, size = 266, normalized size = 1.59 \[ -\frac {\left (66 a^{\frac {7}{2}}-33 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{3}\right ) \sin \left (f x +e \right ) \left (\cos ^{2}\left (f x +e \right )\right )+\left (-448 a^{\frac {7}{2}}+132 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{3}\right ) \sin \left (f x +e \right )+\left (154 a^{\frac {7}{2}}-99 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{3}\right ) \left (\cos ^{2}\left (f x +e \right )\right )-320 a^{\frac {7}{2}}+132 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{3}}{768 a^{\frac {11}{2}} \left (1+\sin \left (f x +e \right )\right )^{2} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^2/(a+a*sin(f*x+e))^(5/2),x)

[Out]

-1/768/a^(11/2)*((66*a^(7/2)-33*(a-a*sin(f*x+e))^(1/2)*2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1
/2))*a^3)*sin(f*x+e)*cos(f*x+e)^2+(-448*a^(7/2)+132*(a-a*sin(f*x+e))^(1/2)*2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e)
)^(1/2)*2^(1/2)/a^(1/2))*a^3)*sin(f*x+e)+(154*a^(7/2)-99*(a-a*sin(f*x+e))^(1/2)*2^(1/2)*arctanh(1/2*(a-a*sin(f
*x+e))^(1/2)*2^(1/2)/a^(1/2))*a^3)*cos(f*x+e)^2-320*a^(7/2)+132*(a-a*sin(f*x+e))^(1/2)*2^(1/2)*arctanh(1/2*(a-
a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*a^3)/(1+sin(f*x+e))^2/cos(f*x+e)/(a+a*sin(f*x+e))^(1/2)/f

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^2/(a+a*sin(f*x+e))^(5/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\mathrm {tan}\left (e+f\,x\right )}^2}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{5/2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^2/(a + a*sin(e + f*x))^(5/2),x)

[Out]

int(tan(e + f*x)^2/(a + a*sin(e + f*x))^(5/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^{2}{\left (e + f x \right )}}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {5}{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**2/(a+a*sin(f*x+e))**(5/2),x)

[Out]

Integral(tan(e + f*x)**2/(a*(sin(e + f*x) + 1))**(5/2), x)

________________________________________________________________________________________